package psim;

import java.lang.reflect.InvocationTargetException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * Trida, ktera zapouzdruje pole castic, v tomto pripade se jedna o situaci,
 * kdy je k dipozici jen jeden procesor.
 * @author Tomas Drimal
 */
public class PtcsSigle extends PtcsBase {

    /**
     * metoda, ktera vola metodu pro zmenu poloh castic
     */
    public void chPos() {
        try {
            chPosFT(0, this.partcs.size());
        } catch (NoSuchMethodException ex) {
            Logger.getLogger(PtcsSigle.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            Logger.getLogger(PtcsSigle.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IllegalArgumentException ex) {
            Logger.getLogger(PtcsSigle.class.getName()).log(Level.SEVERE, null, ex);
        } catch (InvocationTargetException ex) {
            Logger.getLogger(PtcsSigle.class.getName()).log(Level.SEVERE, null, ex);
        }
            this.saveNew(); //ulozeni novych hodnot do starych
            
            Main.cykly++;
       

    }
}
